package com.special.threademo.jvm.classLoader;

import com.special.threademo.spring.SourceTest;

/**
 * Created with IDEA2020.3
 * author:LiuYC
 * DateTime:2021/1/23  17:15
 * 最简单的一点是：没有注释！
 */
public class ClassLoadRule {
    public static void main(String[] args) {
        System.out.println(child.a);
        child.doSomeththing();
    }
}

class parent {
    static int a = 3;

    static {
        System.out.println("myparent blocked voked");
    }

    static void doSomeththing() {
        System.out.println("do something");
    }
}

class child extends parent {
    static {
        System.out.println("chiled blocked");
    }
}